cody - HTMLify profile

cody
4270 Files
633421 Views
Latest files of /cody/swapnilsparsh/30DaysOfJavaScript/71 - Background Color Changer
const colors = ["green ","red","rgba(133,122,200)","#f15025"];
const btn=document.getElementById('btn');
const color =document.querySelector(".bg");
btn.addEventListener('click', ()=>{
//get randomg nu. between 0-3
const randomNo = Math.floor(random() * colors.length );
console.log(randomNo);
const btn=document.getElementById('btn');
const color =document.querySelector(".bg");
btn.addEventListener('click', ()=>{
//get randomg nu. between 0-3
const randomNo = Math.floor(random() * colors.length );
console.log(randomNo);
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
*{
margin: 0;
padding: 0;
}
a{
text-decoration: none;
margin: 0;
padding: 0;
}
a{
text-decoration: none;
Baackground Color Changer
cody/swapnilsparsh/30DaysOfJavaScript/71 - Background Color Changer/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">